package designpattern.decorator.livedemo.plantext;

import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;

public class ReadLog {
    public static void main(String[] args) throws IOException {
        InputStream fs = new BufferedInputStream(
            new FileInputStream(
                        new File("data/application.log")));

        try (InputStreamReader reader = new InputStreamReader(fs, "UTF-8")) {
            while (reader.ready())
                System.out.print((char) reader.read());
        }
    }
}
